package com.home.simple.web;

import javax.jws.WebMethod;
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;
import javax.jws.soap.SOAPBinding.ParameterStyle;
import javax.jws.soap.SOAPBinding.Style;
import javax.jws.soap.SOAPBinding.Use;

import com.home.simple.web.model.User;

@WebService(endpointInterface="com.home.simple.web.HelloService", name="HelloService")
@SOAPBinding(style=Style.DOCUMENT, use=Use.LITERAL, parameterStyle=ParameterStyle.WRAPPED)
public class HelloServiceImpl implements HelloService {

	@WebMethod(operationName="sayHello")
	public String sayHello() {
		return "hello";
	}

	@WebMethod(operationName="getUser")
	public User getUserWithId(int id) {
		User user = new User();
		user.setId(1);
		user.setFirstName("erdem");
		user.setLastName("ilhan");
		user.setPhoneNumber("04191");
		user.addSegment("business");
		return user;
	}

}
